import requests

from dao.task_video_dao import TaskVideoDAO


class DownloadBlob:

    def download_blob(self):

        # task_video_dao = TaskVideoDAO()
        # video_list = task_video_dao.get_not_null_task_videos()
        # for video in video_list:

        # 发送 GET 请求
        response = requests.get("https://91porn.porn/1378ebc4-da3c-4af1-a8e3-c0fdb5ced483/blob")
        # 检查请求是否成功
        if response.status_code == 200:
            # 将 Blob 内容保存到文件
            with open("output.mp4", "wb") as f:
                f.write(response.content)
            print("Blob content downloaded successfully.")
        else:
            print(f"Failed to download the Blob. Status code: {response.status_code}")


if __name__ == '__main__':
    download_blob = DownloadBlob()
    download_blob.download_blob()